package deng.jboss.examples.mdb;

import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.Message;
import javax.jms.MessageListener;

import org.apache.log4j.Logger;


/**
 * @author Zemian Deng
 *
 */
@MessageDriven(
	messageListenerInterface = MessageListener.class,
	activationConfig = { 
		@ActivationConfigProperty(propertyName = "destination", propertyValue = "/queue/ExampleQueue"),
		@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
	}
)
public class MsgBean implements MessageListener {

	private static Logger logger = Logger.getLogger(MsgBean.class);
		
	@Override
    public void onMessage(Message message) {
		logger.info("Received message: " + message);
    }
	
}
